package org.aceor.mddal.gateway.router;

import com.google.common.base.Objects;

import java.util.List;

/**
 * Created by lxue on 16/4/11.
 */
public class RealSqlContext {
    public String sql;
    public String realTable;
    public List<Object> args;

    public RealSqlContext(String sql, String realTable, List<Object> args) {
        this.sql = sql;
        this.realTable = realTable;
        this.args = args;
    }


    public RealSqlContext(String sql) {
        this.sql = sql;
    }

    public RealSqlContext(String sql, String realTable) {
        this.sql = sql;
        this.realTable = realTable;
    }

    @Override
    public String toString() {
        return Objects.toStringHelper(this)
                .add("sql", sql)
                .add("realTable", realTable)
                .add("args", args)
                .toString();
    }
}
